﻿using EasyDDD.Domain;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EasyDDD.AdminModule.Records.Entities
{
    [PrimaryKey(nameof(RoleId), nameof(SysMenuId))]
    public record SysAdminRoleMenu : Models.SysAdminRoleMenu
    {

        public virtual ApplicationRole ApplicationRole { get; private set; } = default!;
        [ForeignKey(nameof(ApplicationRole))]
        public override Guid RoleId { get; set; } = default!;

        public virtual SysMenu SysMenu { get; private set; } = default!;
        [ForeignKey(nameof(SysMenu))]
        public override Guid SysMenuId { get; set; } = default!;
    }
}
